cmake_minimum_required(VERSION 3.5.1)

add_library( piecewise_jerk_path_optimizer   piecewise_jerk_path_optimizer.cc )
target_link_libraries( piecewise_jerk_path_optimizer
common::vehicle_config_helper
common::math
common::cartesian_frenet_conversion
common::qp_solver
common_proto
common::util
map_proto
planning::obstacle
planning_obstacle
planning_path_boundary
planning_path_decision
planning_planning_context
planning::planning_gflags
planning::discretized_path
planning::frenet_frame_path
planning::path_data
planning::st_boundary
planning::discretized_trajectory
planning::speed_data
planning_lattice_trajectory1d
planning_end_condition_sampler
planning_lattice_trajectory_generation_module

planning_polynomial_xd
planning::quartic_polynomial_curve1d
planning::polynomial_curve1d
planning_piecewise_jerk_path_problem

planning_proto

planning::reference_line
path_optimizer
Eigen3::Eigen
)


add_library( piecewise_jerk_path_ipopt_solver  piecewise_jerk_path_ipopt_solver.cc )
target_include_directories(piecewise_jerk_path_ipopt_solver PUBLIC
${IPOPT_INCLUDE_DIRS}
)

target_link_libraries( piecewise_jerk_path_ipopt_solver
Eigen3::Eigen
${IPOPT_LIBRARIES}
)

install(TARGETS  
piecewise_jerk_path_optimizer
piecewise_jerk_path_ipopt_solver
        EXPORT  apollo-export
        LIBRARY DESTINATION lib
        ARCHIVE DESTINATION lib
        RUNTIME DESTINATION bin
        INCLUDES DESTINATION .
        )